import type { App } from 'vue';
import { confirmManager, $baseConfirm, $confirmDelete, $confirmWarning, $confirmInfo } from '@/utils/confirm';

export default {
  install(app: App) {
    // 全局属性
    app.config.globalProperties.$baseConfirm = $baseConfirm;
    app.config.globalProperties.$confirmDelete = $confirmDelete;
    app.config.globalProperties.$confirmWarning = $confirmWarning;
    app.config.globalProperties.$confirmInfo = $confirmInfo;
    app.config.globalProperties.$confirmManager = confirmManager;

    // 提供注入
    app.provide('$baseConfirm', $baseConfirm);
    app.provide('$confirmDelete', $confirmDelete);
    app.provide('$confirmWarning', $confirmWarning);
    app.provide('$confirmInfo', $confirmInfo);
    app.provide('$confirmManager', confirmManager);
  }
}; 